#include "omglcanves.h"

OMGLCanves::OMGLCanves(QWidget* parent)
        : QGLWidget(parent)
{
}

OMGLCanves::~OMGLCanves()
{
}

void OMGLCanves::paintGL ()
{
    this->renderScene();
}

void OMGLCanves::initializeGL()
{
    glClearColor(0.0, 0.0, 0.0, 0.0);

    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
}

void OMGLCanves::resizeGL ( int width, int height )
{
    glViewport(0, 0, (GLsizei)width, (GLsizei)height);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluOrtho2D(0.0, (GLdouble)width, 0.0, (GLdouble)height);
}
